package com.jf.yytgd.validation.constrain;

import com.jf.yytgd.validation.validator.VisibleCharacterValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Created with IntelliJ IDEA
 * Description: 可视字符注解. 支持{String}数据类型. null为非法
 * User:22954
 * Date:2025-01-14
 * Time:11:01
 */
@Documented
@Constraint(validatedBy = {VisibleCharacterValidator.class})
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
public @interface VisibleCharacter {
    String message() default "{com.jf.yytgd.validation.constrain.VisibleCharacter.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
